
import "@/base"

import Vue from 'vue'
import config from '@/config'
import App from '@/App.vue'
import api from '@/api'
import directive from '@/directive'
import plugin from '@/plugin'

Vue.use(config)
Vue.use(api)
Vue.use(directive)
Vue.use(plugin)

import VueRouter from 'vue-router'
Vue.use(VueRouter);

import DefaultPage from '@/pages/DefaultPage.vue'
import ErrorPage from '@/pages/ErrorPage.vue'
import AssetsPage from '@/pages/AssetsPage.vue'
import StylePage from '@/pages/StylePage.vue'
import LessPage from '@/pages/LessPage.vue'
import AjaxNotUtil from '@/pages/AjaxNotUtil.vue'
import AxiosUsePage from '@/pages/AxiosUsePage.vue'
import AjaxCors from '@/pages/AjaxCors.vue'
import AjaxUtil from '@/pages/AjaxUtil.vue'

let router = new VueRouter({
  routes:[
    { path:"/home",component:DefaultPage },
    { path:"/error",component:ErrorPage },
    { path:"/assets",component:AssetsPage },
    { path:"/style",component:StylePage },
    { path:"/less",component:LessPage },
    { path:"/ajax",component:AjaxNotUtil },
    { path:"/axios",component:AxiosUsePage },
    { path:"/cors",component:AjaxCors },
    { path:"/util",component:AjaxUtil },
  ]
});

new Vue({
  router:router,
  render: h => h(App),
}).$mount('#app')
